import http from "@/utils/http"
// 面包屑导航获取接口区域
export const getCategoryAPI = (id) => {
  return http({
    url: '/category',
    method: 'get',//默认接口可以不写
    //传递参数为params,如果为post请求，则传递为data
    params:{
        id
    }
    // url:'/category',
    // method:'get',
    // params:{
    //   id
    // }
  })
}
export const getCategoryFilterAPI = (id) => {
  return http({
    url:'/category/sub/filter',
    params:{
      id
    }
  })
}
/**
 * @description: 获取导航数据
 * @data { 
     categoryId: 1005000 ,
     page: 1,
     pageSize: 20,
     sortField: 'publishTime' | 'orderNum' | 'evaluateNum'
   } 
 * @return {*}
 */
   export const getSubCategoryAPI = (data) => {
    return http({
      url:'/category/goods/temporary',
      method:'POST',
      data
    })
  }